﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Jemgine.MapEditor
{
	public partial class GearProperties : Form
	{
		CreateGearProperties _settings;

		public GearProperties(CreateGearProperties Settings)
		{
			_settings = Settings;
			InitializeComponent();
		}

		private void createButton_Click(object sender, EventArgs e)
		{
			try
			{
				_settings.Radius = Convert.ToSingle(radiusBox.Text);
				_settings.Teeth = Convert.ToInt32(teethBox.Text);
				_settings.ToothDepth = Convert.ToSingle(toothDepthBox.Text);
				_settings.TipPercentage = Convert.ToSingle(tipPercentageBox.Text);
				_settings.Cancelled = false;
				this.Close();
			}
			catch (Exception)
			{ }
		}

		private void cancelButton_Click(object sender, EventArgs e)
		{
			_settings.Cancelled = true;
			this.Close();
		}

	}
}
